<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <!-- <script src="./static/js/jq.min.js"></script> -->
    <script src="./static/js/three.min.js"></script>
    <script src="./static/js/mannequin.js"></script>
  </head>

  <body>
    <script>
      createScene();
      man = new Male();

      //   man.torso.bend = 45; /* bend=45 */
      //   man.torso.turn = 45; /* turn=45, but now bend≈35.3 */

      //   man.position.x = 0;
      //   man.turn = -90;
      A = { version: 5, data: [[90, -85, 74.8]] };
      B = { version: 5, data: [[0, -90, 0]] };

      // set an intermediate posture
      //   man.posture = {"version":6,"data":[3.8,[0,-90,0],[0,0,-2.4],[0,0,5],[6,0,0],[0],[-6,-6,-0.6],[-6,0,0],[0],[6,6,-0.6],[7,-0.6,-5],[15],[-15,0,0],[10,10],[-7,0.6,54.2],[15],[15,0,0],[10,10]]}

      bottom = Math.min(
        man.l_ankle.point(6, 2, 0).y,
        man.l_ankle.point(-2, 2.5, 0).y,
        man.l_ankle.point(2, 2.5, 2).y,
        man.l_ankle.point(2, 2.5, -2).y,

        man.r_ankle.point(6, 2, 0).y,
        man.r_ankle.point(-2, 2.5, 0).y,
        man.r_ankle.point(2, 2.5, 2).y,
        man.r_ankle.point(2, 2.5, -2).y
      );

      man.position.y += -29.5 - bottom;
    </script>
    <!-- <canvas width="1920" height="387" style="width: 1920px; height: 387px; position: fixed; top: 0px; left: 0px;"></canvas> -->
  </body>
</html>
